import { Injectable } from "@nestjs/common";
import { ApiProperty } from "@nestjs/swagger";
import { IsString, MaxLength, MinLength } from "class-validator";


export class LoginInput {
    @ApiProperty({
        description: "学号",
        type: String
    })
    @IsString()
    @MinLength(5, { message: "账号不得小于5位" })
    @MaxLength(15, { message: "账号不得超过15位" })
    account: string

    @ApiProperty({
        description: "密码，默认为学号",
        type: String
    })
    @IsString()
    @MinLength(6, { message: "密码不得小于6位" })
    password: string
}